//导入根组件
import Vue from 'vue'
//导入elementUI
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
Vue.use(ElementUI);

//导入根页面
import HomePage from './HomePage.vue'

import router from './router/index.js'
//阻止 vue 在启动时生成生产提示。
Vue.config.productionTip = false;

//将vue-router集成到项目中
import VueRouter from 'vue-router'
//将VueRouter绑定到Vue对象上
Vue.use(VueRouter);

//导入路由规则对应的组件对象
import homepage from './components/homepage/homepage'
import training from './components/training/training'
import Information from './components/information/information'
import alliance from './components/alliance/alliance'
import about from './components/about/about'
import contact from './components/contact/contact'
//定义路由规则
var Router = new VueRouter({
    routes:[
        {
            path:'/',
            redirect:'/homepage',
        },
        {
            path:'/homepage',
            component:homepage,
        },
        {
            path:'/training',
            component:training,
        },
        {
            path:'/Information',
            component:Information,
        },
        {
            path:'/alliance',
            component:alliance,
        },
        {
            path:'/about',
            component:about,
        },
        {
            path:'/contact',
            component:contact,
        }
    ]
});

new Vue({
    el:'#app',
    router:Router,
    components: { HomePage },
    template:'<HomePage></HomePage>'
});